package it.patterns.creational.factorymethod;

/**
 * Define an interface for creating an object, but let subclasses decide which
 * class to instantiate. It lets a class defer instantiation to subclasses.
 * 
 * Factory methods eliminate the need to bind application-specific classes into
 * your code. The code only deals with the Product interface; therefore it can
 * work with any user-defined Concrete Product classes.
 * 
 * Two main variations: the Creator class is an abstract class and does not
 * provide an implementation for the factory method it declares; the Creator
 * class is a concrete class and it provides a default implementation for the
 * factory method.
 * 
 * <img src="FactoryMethod.jpg" alt="Pattern Structure"/>
 * 
 * @author Luca D'Onofrio
 * 
 * @category Creational Pattern
 * @see "Design Patterns - Element of Reusable Object Oriented Software (Gamma,Helm, Johnson, Vlissides)"
 * 
 * @version 1.0
 * 
 */
public abstract class FactoryMethodCreator {

	public String getType(Product product) {
		return product.getType();
	}

	public abstract Product factoryMethod();
}
